package com.xs.anxingo.server.web.rest;

import com.terran4j.commons.api2doc.annotations.Api2Doc;
import com.terran4j.commons.api2doc.annotations.ApiComment;
import com.xs.anxingo.server.aop.BizLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Controller
 */
@Api2Doc(id = "APIController", name = "用户接口", order = 1)
@Slf4j
@RestController
public class APIController {

    @Api2Doc(order = 1)
    @ApiComment("健康检查接口")
    @RequestMapping("/ok")
    @BizLog(logType = "REST")
    public String ok() {
        log.info("APIController.ok");
        return "ok";
    }

    @Api2Doc(order = 2)
    @ApiComment("应用API调用接口")
    @PostMapping("/doAPI")
    public String doAPI() {
        return "ok";
    }

}
